import Home from '../views/publicView/Main.vue';

const routes = [
  {
    path: '/article',
    name: 'homea',
    component: Home,
    children: [
      {
        path: 'article',
        name: 'article',
        component: () => import(/* webpackChunkName: "about" */ '../views/article/articleList.vue'),
      },
    ],
  }, {
    path: '/tag',
    name: 'homet',
    component: Home,
    children: [
      {
        // 当 /user/:id/posts 匹配成功
        // UserPosts 会被渲染在 User 的 <router-view> 中
        path: 'tag',
        name: 'tag',
        component: () => import(/* webpackChunkName: "about" */ '../views/tag/tagList.vue'),
      },
    ],
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/publicView/About.vue'),
  },
  {
    path: '/login',
    name: 'login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/publicView/LogIn.vue'),
  },
];

export default routes;
